{% extends 'tpls/base.html' %}
{% load crispy_forms_tags settings_tags %}

{% block title %}Login{% endblock %}

{% block navbar %}{% endblock %}

{% block content %}

<div class="login-content">
	{% include "admin/messages.html" %}
</div>

<main class="container login-content py-5 size-15" style="min-height: 700px;">
	<a href="{% url 'home' %}" class="btn btn-outline-primary goback"><i class="bi bi-arrow-left"></i> Go Back</a>
	<div class="row">
		<div class="col-md-12">
			<div class="my-5 text-center">
				{% settings 'SHOW_LOGO' as show_logo %}
				{% if show_logo %}
					<img src="{% dj_settings 'LOGO_URL' %}" alt="{% settings 'SITE_NAME' %}">
				{% else %}
					<span class="header-colorize display-4">{% settings "SITE_NAME" %}</span>
				{% endif %}
			</div>
		</div>

		<div class="col-md-12">
			<div class="card card-primary w-25 mx-auto login-section">
				{% block card %}
					<div class="card-header">
						<h1 class="card-title size-15 m-0">Login</h1>
					</div>
					<div class="card-body">
						<form action="{{ app_path }}" method="POST">
							{% csrf_token %}
							{{ form|crispy }}

							<button type="submit" class="btn btn-primary btn-block">Login</button>
						</form>
						<div class="mb-2 mt-4 d-flex justify-content-between">
							<a href="{% url 'register' %}">Don't have an account?</a>
							<a href="{% url 'reset_password' %}">Forget password?</a>
						</div>
					</div>
				{% endblock %}
			</div>
		</div>
	</div>
</main>
{% endblock %}
